package com.hengpeng.itfinbase.persist;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Enumerated;

import com.hengpeng.common.web.annotation.HtmlInput;
import com.hengpeng.common.web.annotation.HtmlInputType;
import com.hengpeng.itfinbase.idAssign.AbstractAssign18IdEntity;

/**
 * <pre>
 * 收款计划
 * </pre>
 * @author chenhui
 * @version 1.0, 2015-5-18
 */
@Entity
public class ReceivePlan extends AbstractAssign18IdEntity
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -1048765228276674629L;

	/**
	 * 投资用户名
	 */
	@HtmlInput(index = 1, type = HtmlInputType.TEXT, label = "投资人", nullable = false)
	private String investUserName;

	/**
	 * 投标用户id
	 */
	@HtmlInput(index = 2, type = HtmlInputType.TEXT, label = "投资人id", nullable = false)
	private Long investUserId;

	/**
	 * 投标信息Id
	 */
	@HtmlInput(index = 3, type = HtmlInputType.TEXT, label = "投标信息Id", nullable = false)
	private Long investmentInfoId;

	/**
	 * 投标人第三方托管账户id
	 */
	@HtmlInput(index = 4, type = HtmlInputType.TEXT, label = "投标人第三方托管账户id", nullable = false)
	private String investUserTrustAccountId;

	/**
	 * 借款信息id
	 */
	@HtmlInput(index = 5, type = HtmlInputType.TEXT, label = "借款信息id", nullable = false)
	private Long borrowInfoId;

	/**
	 * 借款标的名称
	 */
	@HtmlInput(index = 6, type = HtmlInputType.TEXT, label = "标的名称", nullable = false)
	private String borrowName;

	/**
	 * 应收金额
	 */
	@HtmlInput(index = 7, type = HtmlInputType.TEXT, label = "应收金额(分)", nullable = false)
	private Long recMoney;

	/**
	 * 应收本金
	 */
	@HtmlInput(index = 8, type = HtmlInputType.TEXT, label = "应收本金(分)", nullable = false)
	private Long recBaseMoney;

	/**
	 * 应收利息
	 */
	@HtmlInput(index = 9, type = HtmlInputType.TEXT, label = "应收利息(分)", nullable = false)
	private Long recInterestMoney;

	/**
	 * 附加利息
	 */
	@HtmlInput(index = 10, type = HtmlInputType.TEXT, label = "附加利息(分)", nullable = false)
	private Long recAddMoney;

	/**
	 * 预计到账时间
	 */
	@HtmlInput(index = 10, type = HtmlInputType.TEXT, label = "预计到账时间", nullable = false)
	private Date arrivalTime;

	/**
	 * 收款时间
	 */
	@HtmlInput(index = 11, type = HtmlInputType.TEXT, label = "收款时间", nullable = false)
	private Date receiveTime;

	/**
	 * 收款状态
	 */
	@HtmlInput(index = 12, type = HtmlInputType.TEXT, label = "状态", nullable = false, labelProperty = "text")
	@Enumerated(javax.persistence.EnumType.STRING)
	private ReceiveStatus status;

	/**
	 * 总收款期数
	 */
	@HtmlInput(index = 13, type = HtmlInputType.TEXT, label = "总期数", nullable = false)
	private int totalRecNum;

	/**
	 * 当前期数
	 */
	@HtmlInput(index = 14, type = HtmlInputType.TEXT, label = "当前期数", nullable = false)
	private int curRecNum;

	/**
	 * 还款批次号
	 */
	@HtmlInput(index = 15, type = HtmlInputType.TEXT, label = "还款批次号", nullable = false)
	private String batchId;

	/**
	 * 创建时间
	 */
	@HtmlInput(index = 16, type = HtmlInputType.TEXT, label = "创建时间", nullable = false)
	private Date createTime;

	/**
	 * 最后更新时间
	 */
	@HtmlInput(index = 17, type = HtmlInputType.TEXT, label = "最后更新时间", nullable = false)
	private Date updateTime;

	public Long getRecAddMoney()
	{
		return recAddMoney;
	}

	public void setRecAddMoney(Long recAddMoney)
	{
		this.recAddMoney = recAddMoney;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public String getInvestUserName()
	{
		return investUserName;
	}

	public void setInvestUserName(String investUserName)
	{
		this.investUserName = investUserName;
	}

	public int getTotalRecNum()
	{
		return totalRecNum;
	}

	public void setTotalRecNum(int totalRecNum)
	{
		this.totalRecNum = totalRecNum;
	}

	public int getCurRecNum()
	{
		return curRecNum;
	}

	public void setCurRecNum(int curRecNum)
	{
		this.curRecNum = curRecNum;
	}

	public Long getInvestmentInfoId()
	{
		return investmentInfoId;
	}

	public void setInvestmentInfoId(Long investmentInfoId)
	{
		this.investmentInfoId = investmentInfoId;
	}

	public Long getBorrowInfoId()
	{
		return borrowInfoId;
	}

	public void setBorrowInfoId(Long borrowInfoId)
	{
		this.borrowInfoId = borrowInfoId;
	}

	public String getBorrowName()
	{
		return borrowName;
	}

	public void setBorrowName(String borrowName)
	{
		this.borrowName = borrowName;
	}

	public Long getRecMoney()
	{
		return recMoney;
	}

	public void setRecMoney(Long recMoney)
	{
		this.recMoney = recMoney;
	}

	public Long getRecBaseMoney()
	{
		return recBaseMoney;
	}

	public void setRecBaseMoney(Long recBaseMoney)
	{
		this.recBaseMoney = recBaseMoney;
	}

	public Long getRecInterestMoney()
	{
		return recInterestMoney;
	}

	public void setRecInterestMoney(Long recInterestMoney)
	{
		this.recInterestMoney = recInterestMoney;
	}

	public Date getArrivalTime()
	{
		return arrivalTime;
	}

	public void setArrivalTime(Date arrivalTime)
	{
		this.arrivalTime = arrivalTime;
	}

	public Date getReceiveTime()
	{
		return receiveTime;
	}

	public void setReceiveTime(Date receiveTime)
	{
		this.receiveTime = receiveTime;
	}

	public ReceiveStatus getStatus()
	{
		return status;
	}

	public void setStatus(ReceiveStatus status)
	{
		this.status = status;
	}

	public String getInvestUserTrustAccountId()
	{
		return investUserTrustAccountId;
	}

	public void setInvestUserTrustAccountId(String investUserTrustAccountId)
	{
		this.investUserTrustAccountId = investUserTrustAccountId;
	}

	public String getBatchId()
	{
		return batchId;
	}

	public void setBatchId(String batchId)
	{
		this.batchId = batchId;
	}

	public Long getInvestUserId()
	{
		return investUserId;
	}

	public void setInvestUserId(Long investUserId)
	{
		this.investUserId = investUserId;
	}

	/**
	 * <pre>
	 * 收款状态
	 * </pre>
	 * @author chenhui
	 * @version 1.0, 2015-5-15
	 */
	public static enum ReceiveStatus
	{
		/**
		 * 待收款
		 */
		WAITREC("待收款"),
		/**
		 * 收款中
		 */
		RECEIVING("收款中"),
		/**
		 * 已收款
		 */
		RECEIVED("已收款");

		private String text;

		ReceiveStatus(String text)
		{
			this.text = text;
		}

		public String getText()
		{
			return text;
		}

		public void setText(String text)
		{
			this.text = text;
		}
	}
}
